<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/10/11
 * Time: 8:09
 */

class Shape
{
     public function getArea(){

    }
    public static function getPi(){
         return 3.14;
    }
}

echo Shape::getPi();

class Rectangle extends Shape{
    private $instance;
    private  $width,$height;
    private function __construct()
    {
        //$this->height=$height;
        //$this->width=$width;
    }
    public static function getObj(){
        if (Rectangle::instance){

        }
        return new Rectangle();
    }
     public function getArea()
    {
        return $this->width*$this->height;
    }


}
$a= Rectangle::getObj();
$b=Rectangle::getObj();

class Rect extends Rectangle{
    public function __construct($height, $width)
    {
        parent::__construct($height, $width);
    }
}